export const formItems = [
  {
    filed: 'equipmentName',
    type: 'input',
    label: '器材名称'
  },
  {
    filed: 'leaseUserinfo',
    type: 'input',
    label: '租赁人信息',
    placeholder: '请输入姓名/手机号'
  },
  {
    filed: 'status',
    type: 'select',
    label: '状态',
    options: [{
      label: '租赁中',
      value: '0'
    }, {
      label: '已归还',
      value: '1'
    }, {
      label: '待支付',
      value: '2'
    }, {
      label: '取消支付',
      value: '3'
    }]
  },
  {
    filed: 'time',
    type: 'datetimerange',
    clearable: false,
    label: '租赁时间',
    pickerOptions: {
      shortcuts: [{
        text: '近7天',
        onClick(picker) {
          const end = new Date()
          const start = new Date()
          end.setTime(end.getTime())
          start.setTime(start.getTime() - 3600 * 1000 * 24 * 6)
          picker.$emit('pick', [start, end])
        }
      },
      {
        text: '近30天',
        onClick(picker) {
          const end = new Date()
          const start = new Date()
          end.setTime(end.getTime())
          start.setTime(start.getTime() - 3600 * 1000 * 24 * 29)
          picker.$emit('pick', [start, end])
        }
      },
      {
        text: '近60天',
        onClick(picker) {
          const end = new Date()
          const start = new Date()
          end.setTime(end.getTime())
          start.setTime(start.getTime() - 3600 * 1000 * 24 * 59)
          picker.$emit('pick', [start, end])
        }
      },
      {
        text: '近90天',
        onClick(picker) {
          const end = new Date()
          const start = new Date()
          end.setTime(end.getTime())
          start.setTime(start.getTime() - 3600 * 1000 * 24 * 89)
          picker.$emit('pick', [start, end])
        }
      }]
    }
  }
]
export const queryFormConfig = {
  formItems,
  online: true
}
